package com.mgkj.common.utils;

import com.github.pagehelper.Page;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author : ssy
 * @date: 2024-05-29
 * @Description: 分页封装
 */
public class MapUtils {
    public static Map<String, Object> getMap(Page<?> page, List<?> dataList) {
        Map<String, Object> map = new HashMap<>();
        map.put("total", page.getTotal());
        map.put("pageNum", page.getPageNum());
        map.put("pageSize", page.getPageSize());
        map.put("list", dataList);
        return map;
    }
}
